package online.longzipeng.back.utils;

import io.netty.channel.Channel;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;

/**
 * @Author: lzp
 * @Description: 消息通知工具类
 * @Date: Created in 11:19 2022/6/7
 */
public class NotifyUtils {

    /**
     * 向指定channel推送消息
     *
     * @param channel
     * @param message
     */
    public static void pushMessage(Channel channel, String message) {
        channel.writeAndFlush(new TextWebSocketFrame(message));
    }
}
